import os
from pydantic import BaseModel


class Config(BaseModel):
    base: str = "./src"
    output: str = "./result"

    dataset: str = "2025dog"
    image_type: str = "png"
    image_name: str = "Base_100001"

    @property
    def source(self) -> str:
        return os.path.join(self.base, self.dataset)

    @property
    def image_dir(self) -> str:
        return os.path.join(self.source, "images")

    @property
    def annotation_dir(self) -> str:
        return os.path.join(self.source, "annotations")

    @property
    def dest(self) -> str:
        return os.path.join(self.output, self.dataset)

    def image_path(self) -> str:
        return os.path.join(self.image_dir, f"{self.image_name}.{self.image_type}")

    def xml_path(self) -> str:
        return os.path.join(self.annotation_dir, f"{self.image_name}.xml")
